package com.carkeeper.service;

import com.carkeeper.dto.UserDTO;
import com.carkeeper.service.serviceFallback.UserFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author ：XXX
 * @date ：Created in 2020/6/1
 * @description ：
 * @version: 1.0
 */
@FeignClient(value = "carkeeper-shop",fallbackFactory = UserFallbackFactory.class)
public interface UserFeign {

    @GetMapping("/storeUser/{id}")
    UserDTO getUser(@PathVariable(value = "id") Long id);

    @PostMapping("/storeUser/list")
    List<UserDTO> getByIds(@RequestBody List<Long> ids);

}

